package org.community.controller;

import cn.dev33.satoken.context.SaHolder;
import cn.dev33.satoken.spring.SpringMVCUtil;
import cn.dev33.satoken.sso.SaSsoProcessor;
import cn.dev33.satoken.util.SaFoxUtil;
import cn.dev33.satoken.util.SaResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


//权限认证接口
@RestController
public class LoginAuthController {

    @RequestMapping("/sso/*")
    public Object ssoRequest() {
        return SaSsoProcessor.instance.clientDister();
    }

    @GetMapping("/logout")
    public Object logout(){
        SaHolder.getResponse().redirect("/sso/logout");
        return SaResult.ok("退出成功");
    }





}
